﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package ZLocalization.Substituters {

    public class SubstituterEnZy extends SubstituterSimple {

        protected static var greekMap:Object = {
            a:"α",
            b:"β",
            c:"ψ",
            d:"δ",
            e:"ε",
            f:"φ",
            g:"γ",
            h:"η",
            i:"ι",
            j:"ξ",
            k:"κ",
            l:"λ",
            m:"μ",
            n:"ν",
            o:"ο",
            p:"π",
            q:";",
            r:"ρ",
            s:"σ",
            t:"τ",
            u:"θ",
            v:"ω",
            w:"ς",
            x:"χ",
            y:"υ",
            z:"ζ",
            A:"Α",
            B:"Β",
            C:"Ψ",
            D:"Δ",
            E:"Ε",
            F:"Φ",
            G:"Γ",
            H:"Η",
            I:"Ι",
            J:"Ξ",
            K:"Κ",
            L:"Λ",
            M:"Μ",
            N:"Ν",
            O:"Ο",
            P:"Π",
            Q:";",
            R:"Ρ",
            S:"Σ",
            T:"Τ",
            U:"Θ",
            V:"Ω",
            W:"Σ",
            X:"Χ",
            Y:"Υ",
            Z:"Ζ"
        };

        protected static function convertString(_arg1:String):String{
            var _local6:String;
            var _local2:int = _arg1.length;
            var _local3:Array = [];
            var _local4:Boolean;
            var _local5:int;
            while (_local5 < _local2) {
                _local6 = _arg1.charAt(_local5);
                if (((_local4) || ((_local6 == "{")))){
                    _local3.push(_local6);
                    _local4 = !((_local6 == "}"));
                } else {
                    _local3.push(convertChar(_local6));
                };
                _local5++;
            };
            return (_local3.join(""));
        }
        protected static function convertChar(_arg1:String):String{
            if (greekMap.hasOwnProperty(_arg1)){
                return (greekMap[_arg1]);
            };
            return (_arg1);
        }

        override public function replace(_arg1:String, _arg2:Object):String{
            var _local3:String;
            _arg1 = convertString(_arg1);
            for (_local3 in _arg2) {
                _arg2[_local3] = convertString(_arg2[_local3]);
            };
            super.replace(_arg1, _arg2);
            return (_arg1);
        }

    }
}//package ZLocalization.Substituters 
